﻿using System.ComponentModel;
using AdAggregator.SearchData;
using ClothingAggregator.Utils;

namespace ClothingAggregator.Models
{
    public class MySearchData : BaseSearchData
    {
        public MySearchData()
        {
            Page = 1;
        }

        [DisplayName("Kategoria")]
        public ClothingCategory Category { get; set; }

        [DisplayName("Kolor")]
        public ClothingColor Color { get; set; }

        [DisplayName("Rozmiar")]
        public ClothingSize Size { get; set; }

        [DisplayName("Grupa wiekowa")]
        public ClothingAge Age { get; set; }

        [DisplayName("Płeć")]
        public ClothingSex Sex { get; set; }

        public decimal PriceMin { get; set; }

        public decimal PriceMax { get; set; }

        public override ISearchData Copy()
        {
            var copy = new MySearchData();
            copy.Age = Age;
            copy.Category = Category;
            copy.Color = Color;
            copy.Sex = Sex;
            copy.Size = Size;
            copy.OrderBy = OrderBy;
            copy.Page = Page;
            copy.PriceMax = PriceMax;
            copy.PriceMin = PriceMin;
            copy.SortingDirection = SortingDirection;
            return copy;
        }
    }
}